<template>
  <div class="body tg">
    <router-link to="/guidebook">
      <div>
        <img src="https://image.hongbeibang.com/FoTuxKG5pqYKuAsT8BjrflkAxEpj?48X48&imageView2/1/w/48/h/48" alt="" />
        <p>学员展示</p>
      </div>
    </router-link>
    <div class="content">
      <!-- 头像加昵称 -->
      <div class="f1">
        <div class="t1">
          <img :src="hu.clientImage" alt="" />
        </div>
        <div class="t2">
          <h4>{{ hu.clientName }}</h4>
          <p>{{ hu.createTime }}</p>
        </div>
      </div>
      <!-- 发表的图片 -->
      <img :src="hu.coverImage" alt="" />
      <!-- 导师的评语 -->
      <h2>导师评语</h2>
      <div class="f1">
        <div class="t1">
          <img :src="data.clientImage" alt="" />
        </div>
        <div class="t2">
          <h4>{{ data.clientName }}</h4>
          <p>{{ data.createTime }}</p>
          <div>{{ data.coverSummary }}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      data: {},
      hu: {}
    }
  },
  mounted() {
    this.getData()
    this.yongHu()
    this.zuoye()
  },
  methods: {
    // 接收参数
    zuoye() {
      this.$route.query.lid
    },
    // 用户数据
    yongHu() {
      this.axios.get(`/dish/getSingleCourseContent?_t=1666064347108&contentId=${this.$route.query.lid}&educationCourseId=10533&timestamp=1666064347103`).then(res => {
        this.hu = res.data.data.dish
      })
    },
    // 导师数据
    getData() {
      this.axios.get(`/comment/getFloorByTeacher?_t=1666064347422&pageIndex=0&pageSize=10&contentId=${this.$route.query.lid}&timestamp=1666064347422`).then(res => {
        this.data = res.data.data[0]
      })
    }
  }
}
</script>

<style scoped>
.tg > a > div:first-child > img {
  width: 8vw;
  margin: 2vh 3vw;
}
.tg > a > div:first-child {
  display: flex;
}
.tg > a > div:first-child > p {
  margin-top: 3vh;
  margin-left: 27vw;
  color: black;
  font-size: 5vw;
}
.content {
  width: 100vw;
  margin: 0 auto;
}
.content > img {
  width: 60%;
  padding-left: 5vw;
}
.f1 {
  display: flex;
  margin: 2vh 0;
  /* width: 90%; */
  padding-left: 5vw;
}
.f1 .t1 {
  width: 10vw;
  height: 5vh;
  overflow: hidden;
  border-radius: 100%;
}
.f1 .t1 > img {
  width: 100%;
}
.f1 .t2 {
  margin-left: 2vw;
}
.f1 .t2 > div {
  margin-top: 2vh;
}
.content > h2 {
  border-top: 3vh solid #f2f2f2;
  padding-top: 3vh;
  margin-top: 4vh;
  color: #5c5c5c;
  padding-left: 5vw;
}
p {
  color: #5c5c5c;
}
h4 {
  color: #3f3f3f;
}
</style>
